package com.amazon.spring8amazon.common;

public class StrTools {



    // 根据逗号拆分得到字符数组 用于动态sql语句执行in元素
    public static StringBuilder StrMerge(String str) {
        StringBuilder res = new StringBuilder();
        for (int i = 0; i < str.split(",").length ; i++) {

            String resX = str.split(",")[i];
            res.append("'").append(resX.trim()).append("'").append(",");
        }
        res.deleteCharAt(res.length()-1);
        return res;
    }
}
